<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"
      xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>应收台账详情</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link href="/dist/plugins/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/dist/plugins/webuploader-0.1.5/webuploader.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=f5a12a1d">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>


        .table-detail input[type=text] {
            padding-left: 0;
        }

        .table-detail td {
            /*font-size: 16px;*/
            line-height: 35px;
            height: 35px;
            border-right: 1px solid #cbcbcb;
            border-bottom: 1px solid #cbcbcb;
        }

        .table-detail td.td-title {
            line-height: 1.5;
            background: #F5F5F5;
            position: relative;
            text-align: left;
            padding-left: 20px !important;
        }

        input {
            text-align: left !important;
            position: absolute;
            left: 5px;
            top: 4px;
        }

        .input {
            text-align: center !important;
        }

        .table-detail {
            border-left: 1px solid #cbcbcb;
            border-top: 1px solid #cbcbcb;
        }

        .table-detail .td-module {
            background-color: yellow;
            color: black;
        }

        .spanqx {
            position: absolute;
            top: 0px;
            left: 20px;
        }

        .inputqx {
            position: absolute;
            top: 7px;
        }

        label {
            display: inline-block;
            max-width: 100%;
            margin-bottom: 5px;
            font-weight: normal;
        }
    </style>
</head>
<body>

<section class="content" id="app2" v-cloak style="padding:0px;">
    <iframe id="ifExprot" style="width:0px;height:0px;display: none;" frameborder="0"></iframe>
    <div class="center">
        <table class="table-detail" id="customer">
            <tr class="td-module">
                <td colspan="8"><label><input type="checkbox" class="inputqx" @click="selectAll('customer',checkBox1)"
                                              v-model="checkBox1"><span
                        class="spanqx">全选</span></label>客户基本信息
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width: 12.5%;">
                    <label>
                        <input type="checkbox" attr-data='contractNo-合同编号'
                               :checked="(checkedAccounts).indexOf('contractNo-合同编号')>=0"
                               @click.prevent="checkedOne('contractNo-合同编号')"> 合同编号</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='customerCredit-客户分类'
                                                                         :checked="(checkedAccounts).indexOf('customerCredit-客户分类')>=0"
                                                                         @click.prevent="checkedOne('customerCredit-客户分类')">客户分类</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='buyer-客户名称'
                                                                         :checked="(checkedAccounts).indexOf('buyer-客户名称')>=0"
                                                                         @click.prevent="checkedOne('buyer-客户名称')">客户名称</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='buyerTel-联系电话'
                                                                         :checked="(checkedAccounts).indexOf('buyerTel-联系电话')>=0"
                                                                         @click.prevent="checkedOne('buyerTel-联系电话')">联系电话</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='actualCarBuyer-实际购车人'
                                                                         :checked="(checkedAccounts).indexOf('actualCarBuyer-实际购车人')>=0"
                                                                         @click.prevent="checkedOne('actualCarBuyer-实际购车人')">实际购车人</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='actualCarBuyerTel-实际购车人电话'
                                                                         :checked="(checkedAccounts).indexOf('actualCarBuyerTel-实际购车人电话')>=0"
                                                                         @click.prevent="checkedOne('actualCarBuyerTel-实际购车人电话')">实际购车人电话</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='buyerTaxNo-身份证号'
                                                                         :checked="(checkedAccounts).indexOf('buyerTaxNo-身份证号')>=0"
                                                                         @click.prevent="checkedOne('buyerTaxNo-身份证号')">身份证号</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='buyerAddress-地址'
                                                                         :checked="(checkedAccounts).indexOf('buyerAddress-地址')>=0"
                                                                         @click.prevent="checkedOne('buyerAddress-地址')">地址</label>
                </td>
            </tr>
            <tr>
                <td class="td-title"><label><input type="checkbox" attr-data='actualUser-实际使用人'
                                                   :checked="(checkedAccounts).indexOf('actualUser-实际使用人')>=0"
                                                   @click.prevent="checkedOne('actualUser-实际使用人')">实际使用人</label>
                </td>


                <td class="td-title"><label><input type="checkbox" attr-data='actualUserTel-实际使用电话'
                                                   :checked="(checkedAccounts).indexOf('actualUserTel-实际使用电话')>=0"
                                                   @click.prevent="checkedOne('actualUserTel-实际使用电话')">实际使用电话</label>
                </td>

                <td class="td-title"><label><input type="checkbox" attr-data='sitePosition-工地及位置'
                                                   :checked="(checkedAccounts).indexOf('sitePosition-工地及位置')>=0"
                                                   @click.prevent="checkedOne('sitePosition-工地及位置')">工地及位置</label></td>

                <td class="td-title"><label><input type="checkbox" attr-data='deviceState-设备状态'
                                                   :checked="(checkedAccounts).indexOf('deviceState-设备状态')>=0"
                                                   @click.prevent="checkedOne('deviceState-设备状态')">设备状态</label>
                </td>

                <!--<td class="td-title"><label><input type="checkbox" @click.prevent="checkedOne('')">担保人</label></td>-->

                <!--<td class="td-title"><label><input type="checkbox" @click.prevent="checkedOne('')">身份证号</label></td>-->

                <!--<td class="td-title"><label><input type="checkbox" @click.prevent="checkedOne('')">担保人电话</label></td>-->

                <!--<td class="td-title"><label><input type="checkbox" @click.prevent="checkedOne('')">担保人地址</label></td>-->
            </tr>
        </table>
        <table class="table-detail" id="company">
            <tr class="td-module">
                <td colspan="8"><label><input type="checkbox" class="inputqx" @click="selectAll('company',checkBox2)"
                                              v-model="checkBox2"><span class="spanqx">全选</span></label>公司人员信息
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='regionName-区域'
                                                                         :checked="(checkedAccounts).indexOf('regionName-区域')>=0"
                                                                         @click.prevent="checkedOne('regionName-区域')">区域</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='regionManagerName-区域经理'
                                                                         :checked="(checkedAccounts).indexOf('regionManagerName-区域经理')>=0"
                                                                         @click.prevent="checkedOne('regionManagerName-区域经理')">区域经理</label>
                </td>


                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='bigRegionManagerName-大区经理'
                                                                         :checked="(checkedAccounts).indexOf('bigRegionManagerName-大区经理')>=0"
                                                                         @click.prevent="checkedOne('bigRegionManagerName-大区经理')">大区经理</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='regionalSupportName-区域支持'
                                                                         :checked="(checkedAccounts).indexOf('regionalSupportName-区域支持')>=0"
                                                                         @click.prevent="checkedOne('regionalSupportName-区域支持')">区域支持</label>
                </td>


                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='createUserName-合同制作人'
                                                                         :checked="(checkedAccounts).indexOf('createUserName-合同制作人')>=0"
                                                                         @click.prevent="checkedOne('createUserName-合同制作人')">合同制作人</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='creditManagerName-债权经理'
                                                                         :checked="(checkedAccounts).indexOf('creditManagerName-债权经理')>=0"
                                                                         @click.prevent="checkedOne('creditManagerName-债权经理')">债权经理</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='dataOfficerName-数据专员'
                                                                         :checked="(checkedAccounts).indexOf('dataOfficerName-数据专员')>=0"
                                                                         @click.prevent="checkedOne('dataOfficerName-数据专员')">数据专员</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='takeOverManager-接管区域经理'
                                                                         :checked="(checkedAccounts).indexOf('takeOverManager-接管区域经理')>=0"
                                                                         @click.prevent="checkedOne('takeOverManager-接管区域经理')">接管区域经理</label>
                </td>

            </tr>
        </table>
        <table class="table-detail" id="device">
            <tr class="td-module">
                <td colspan="8"><label><input type="checkbox" class="inputqx" @click="selectAll('device',checkBox3)"
                                              v-model="checkBox3"><span class="spanqx">全选</span></label>设备信息
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='deliveryDate-交车日期'
                                                                         :checked="(checkedAccounts).indexOf('deliveryDate-交车日期')>=0"
                                                                         @click.prevent="checkedOne('deliveryDate-交车日期')">交车日期</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox"
                                                                         attr-data='deliveryAddress-交车地址'
                                                                         :checked="(checkedAccounts).indexOf('deliveryAddress-交车地址')>=0"
                                                                         @click.prevent="checkedOne('deliveryAddress-交车地址')">交车地址</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='deviceType-设备类型'
                                                                         :checked="(checkedAccounts).indexOf('deviceType-设备类型')>=0"
                                                                         @click.prevent="checkedOne('deviceType-设备类型')">设备类型</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='brandName-品牌'
                                                                         :checked="(checkedAccounts).indexOf('brandName-品牌')>=0"
                                                                         @click.prevent="checkedOne('brandName-品牌')">品牌</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='buyType-付款方式'
                                                                         :checked="(checkedAccounts).indexOf('buyType-付款方式')>=0"
                                                                         @click.prevent="checkedOne('buyType-付款方式')">付款方式</label>
                </td>


                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='modelName-型号'
                                                                         :checked="(checkedAccounts).indexOf('modelName-型号')>=0"
                                                                         @click.prevent="checkedOne('modelName-型号')">型号</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='serialNo-序列号'
                                                                         :checked="(checkedAccounts).indexOf('serialNo-序列号')>=0"
                                                                         @click.prevent="checkedOne('serialNo-序列号')">序列号</label>
                </td>

                <td class="td-title" style="width: 12.5%;"><label><input type="checkbox" attr-data='unitPrice-销售价格'
                                                                         :checked="(checkedAccounts).indexOf('unitPrice-销售价格')>=0"
                                                                         @click.prevent="checkedOne('unitPrice-销售价格')">销售价格</label>
                </td>
            </tr>
            <tr>
                <td class="td-title"><label><input type="checkbox" attr-data='financeCompany-融资公司'
                                                   :checked="(checkedAccounts).indexOf('financeCompany-融资公司')>=0"
                                                   @click.prevent="checkedOne('financeCompany-融资公司')">融资公司</label></td>
                <td class="td-title"><label><input type="checkbox" attr-data='firstPayment-合同首付款合计'
                                                   :checked="(checkedAccounts).indexOf('firstPayment-合同首付款合计')>=0"
                                                   @click.prevent="checkedOne('firstPayment-合同首付款合计')">首付款合计</label>
                </td>

                <td class="td-title"><label><input type="checkbox" attr-data='loanTerm-融资期限'
                                                   :checked="(checkedAccounts).indexOf('loanTerm-融资期限')>=0"
                                                   @click.prevent="checkedOne('loanTerm-融资期限')">融资期限</label>
                </td>

                <td class="td-title"><label><input type="checkbox" attr-data='loanAmount-融资金额'
                                                   :checked="(checkedAccounts).indexOf('loanAmount-融资金额')>=0"
                                                   @click.prevent="checkedOne('loanAmount-融资金额')">融资金额</label></td>

                <td class="td-title"><label><input type="checkbox" attr-data='monthlyRepayment-月还款'
                                                   :checked="(checkedAccounts).indexOf('monthlyRepayment-月还款')>=0"
                                                   @click.prevent="checkedOne('monthlyRepayment-月还款')">月还款</label></td>

                <td class="td-title"><label><input type="checkbox" attr-data='haveReplacement-以旧换新'
                                                   :checked="(checkedAccounts).indexOf('haveReplacement-以旧换新')>=0"
                                                   @click.prevent="checkedOne('haveReplacement-以旧换新')">以旧换新</label></td>

                <td class="td-title"><label><input type="checkbox" attr-data='total-合计'
                                                   :checked="(checkedAccounts).indexOf('total-合计')>=0"
                                                   @click.prevent="checkedOne('total-合计')">合计</label></td>
                <td class="td-title"><label><input type="checkbox" attr-data='haveSettle-是否结清'
                                                   :checked="(checkedAccounts).indexOf('haveSettle-是否结清')>=0"
                                                   @click.prevent="checkedOne('haveSettle-是否结清')">是否结清</label>
                </td>

            </tr>
            <tr>

                <td class="td-title"><label><input type="checkbox" attr-data='financingRate-融资利率'
                                                   :checked="(checkedAccounts).indexOf('financingRate-融资利率')>=0"
                                                   @click.prevent="checkedOne('financingRate-融资利率')">融资利率</label></td>

            </tr>

        </table>
        <table class="table-detail" id="money">
            <tr class="td-module">
                <td colspan="8"><label><input type="checkbox" class="inputqx" @click="selectAll('money',checkBox4)"
                                              v-model="checkBox4"><span class="spanqx">全选</span></label>客户总欠款合计
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width: 13%"><label><input type="checkbox"
                                                                      attr-data='totalDownPayment-应收首付款合计(元)'
                                                                      :checked="(checkedAccounts).indexOf('totalDownPayment-应收首付款合计(元)')>=0"
                                                                      @click.prevent="checkedOne('totalDownPayment-应收首付款合计(元)')">应收首付款合计(元)</label>
                </td>
                <td class="td-title" style="width: 13%"><label><input type="checkbox"
                                                                      attr-data='totalArrears-应收融资款合计(元)'
                                                                      :checked="(checkedAccounts).indexOf('totalArrears-应收融资款合计(元)')>=0"
                                                                      @click.prevent="checkedOne('totalArrears-应收融资款合计(元)')">融资款合计(元)</label>
                </td>
                <td class="td-title" style="width: 13%"><label><input type="checkbox"
                                                                      attr-data='totalCustomerArrears-客户总欠款合计(元)'
                                                                      :checked="(checkedAccounts).indexOf('totalCustomerArrears-客户总欠款合计(元)')>=0"
                                                                      @click.prevent="checkedOne('totalCustomerArrears-客户总欠款合计(元)')">客户总欠款合计(元)</label>
                </td>
                <td class="td-title" style="width: 13%"><label><input type="checkbox"
                                                                      attr-data='accumulatedRepaymentAmount-累计还款金额(元)'
                                                                      :checked="(checkedAccounts).indexOf('accumulatedRepaymentAmount-累计还款金额(元)')>=0"
                                                                      @click.prevent="checkedOne('accumulatedRepaymentAmount-累计还款金额(元)')">累计还款金额(元)</label>
                </td>
                <td colspan="4"></td>
            </tr>
        </table>
        <table class="table-detail" id="cs">
            <tr>
                <td colspan="8" class="td-module">
                    <label><input type="checkbox" class="inputqx" @click="selectAll('cs',checkBox5)"
                                  v-model="checkBox5"><span class="spanqx"
                                                            style="top: 5px">全选</span></label> 催收记录
                </td>
            </tr>
            <tr>
                <td class="td-title" style="width: 13%"><label><input type="checkbox" attr-data='collectionDate-催收日期'
                                                                      :checked="(checkedAccounts).indexOf('collectionDate-催收日期')>=0"
                                                                      @click.prevent="checkedOne('collectionDate-催收日期')">催收日期</label>
                </td>

                <td class="td-title" style="width: 13%"><label><input type="checkbox" attr-data='collection-跟踪记录'
                                                                      :checked="(checkedAccounts).indexOf('collection-跟踪记录')>=0"
                                                                      @click.prevent="checkedOne('collection-跟踪记录')">跟踪记录</label>
                </td>
                <td class="td-title" style="width: 13%"><label><input type="checkbox"
                                                                      attr-data='collectionCreateUserName-操作员'
                                                                      :checked="(checkedAccounts).indexOf('collectionCreateUserName-操作员')>=0"
                                                                      @click.prevent="checkedOne('collectionCreateUserName-操作员')">操作员</label>
                </td>
                <td colspan="5"></td>
            </tr>
            </tr>

        </table>

        <div class="south no-print" style="position: relative">
            <input type="button" style="position: absolute;margin-left: 50%;margin-top: 5px;margin-bottom: 5px"
                   value="确认导出" class="btn btn-primary btn-sm" @click="exportAccount">
        </div>

    </div>
</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=7e54a132"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=63aed32f"></script>
<script src="/page/apply/contract/Template.js?t=42e28def"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script src="/dist/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script type="text/javascript">
    api = frameElement.api, W = api.opener;
    var app = new Vue({
            el: '#app2',
            data: {
                checkedAccounts: [],
                accounts: "",
                isCheck: false,
                checkBox1: false,
                checkBox2: false,
                checkBox3: false,
                checkBox4: false,
                checkBox5: false
            },

            methods: {
                checkedOne: function (moduleKey) {
                    var idIndex = this.checkedAccounts.indexOf(moduleKey)
                    if (idIndex >= 0) {
                        this.checkedAccounts.splice(idIndex, 1)
                    } else {
                        this.checkedAccounts.push(moduleKey)
                    }
                    console.log(this.checkedAccounts)
                },
                selectAll: function (a, checkBox) {
                    var that = this;
                    console.log($("#" + a));
                    $("#" + a + " input").each(function () {
                        var name = $(this).attr("attr-data")
                        var idIndex = that.checkedAccounts.indexOf(name)
                        if (checkBox) {
                            if (idIndex >= 0) {
                                that.checkedAccounts.splice(idIndex, 1)
                            }
                        } else {
                            if (idIndex < 0) {
                                that.checkedAccounts.push(name)
                            }
                        }

                    });
                    console.log(that.checkedAccounts)


                },
                exportAccount: function () {
                    var that = this;
                    App.blockUI({
                        target: '#app2',
                        boxed: true,
                        message: '文件下载中，请耐心等待......'//,
                        // animate: true
                    });
                    var checkedAccountsLists = "";
                    for (var j = 0; j < this.checkedAccounts.length; j++) {
                        if (this.checkedAccounts[j] != "" && this.checkedAccounts[j]) {
                            checkedAccountsLists += this.checkedAccounts[j] + ",";
                        }
                    }
                    this.accounts = checkedAccountsLists.substring(0, checkedAccountsLists.length - 1);
                    $('#ifExprot').attr('src', server.ip
                        + "/contractMain/exportContractAccountList.json"
                        + '?checkedAccounts=' + this.accounts + '&companyId=' + getCurrentUser().companyId
                    );
                    console.log(this.accounts);
                    setTimeout(function () {
                        App.unblockUI('#app2');
                        api.close();
                    }, 3000)

                },

            },
            mounted:

                function () {
                }
        })
    ;
</script>
</body>
</html>